package com.appspot.seqpop.controller;

import org.slim3.controller.Navigation;

import com.appspot.seqpop.service.StoreService;
import com.google.appengine.api.datastore.Key;

public class DeleteController extends SeqpopController {

    StoreService service = new StoreService();
    
    @Override
    public Navigation run() throws Exception {
        Key key = asKey("key");
        if (key == null) {
            throw new Exception("Key is not defined.");
        }
        
        this.service.delete(key);
        return null;
    }
}
